package com.atguigu.pratice;

import java.util.Scanner;

public class YangHuiTriangle {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        int n=scanner.nextInt();
        int[][] array=new int[n][2*n-1];
        for(int i=0;i<n;i++){ // 控制行
            for(int j=n-1-i;j<=n-1+i;j++){ //控制列
                if(j==n-1-i||j==n-1+i){
                    array[i][j]=1;
                }else{
                    array[i][j]=array[i-1][j]+array[i-1][j-1]+array[i-1][j+1];
                }
            }
        }
        //构建完毕
        for(int i=0;i<2*n-1;i++){
            if((array[n-1][i]&1)==0){
                System.out.println(i+1);
                return;
            }
        }
        System.out.println(-1);
    }
}
